<?php
namespace App\Models\Entity\wxbox;

use Swoft\Db\Model;
use Swoft\Db\Bean\Annotation\Column;
use Swoft\Db\Bean\Annotation\Entity;
use Swoft\Db\Bean\Annotation\Id;
use Swoft\Db\Bean\Annotation\Required;
use Swoft\Db\Bean\Annotation\Table;
use Swoft\Db\Types;

/**
 * @Entity()
 * @Table(name="auth_token")
 * @uses      AuthToken
 */
class AuthToken extends Model
{
    /**
     * @var int $id 
     * @Id()
     * @Column(name="id", type="integer")
     */
    private $id;

    /**
     * @var int $wxid 
     * @Column(name="wxid", type="integer")
     * @Required()
     */
    private $wxid;

    /**
     * @var string $openid 
     * @Column(name="openid", type="string", length=64)
     * @Required()
     */
    private $openid;

    /**
     * @var string $token 
     * @Column(name="token", type="string", length=100)
     * @Required()
     */
    private $token;

    /**
     * @var int $addtime 
     * @Column(name="addtime", type="integer")
     * @Required()
     */
    private $addtime;

    /**
     * @var int $isuse 0未验证，1已经验证
     * @Column(name="isuse", type="smallint", default=0)
     */
    private $isuse;

    /**
     * @param int $value
     * @return $this
     */
    public function setId(int $value)
    {
        $this->id = $value;

        return $this;
    }

    /**
     * @param int $value
     * @return $this
     */
    public function setWxid(int $value): self
    {
        $this->wxid = $value;

        return $this;
    }

    /**
     * @param string $value
     * @return $this
     */
    public function setOpenid(string $value): self
    {
        $this->openid = $value;

        return $this;
    }

    /**
     * @param string $value
     * @return $this
     */
    public function setToken(string $value): self
    {
        $this->token = $value;

        return $this;
    }

    /**
     * @param int $value
     * @return $this
     */
    public function setAddtime(int $value): self
    {
        $this->addtime = $value;

        return $this;
    }

    /**
     * 0未验证，1已经验证
     * @param int $value
     * @return $this
     */
    public function setIsuse(int $value): self
    {
        $this->isuse = $value;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * @return int
     */
    public function getWxid()
    {
        return $this->wxid;
    }

    /**
     * @return string
     */
    public function getOpenid()
    {
        return $this->openid;
    }

    /**
     * @return string
     */
    public function getToken()
    {
        return $this->token;
    }

    /**
     * @return int
     */
    public function getAddtime()
    {
        return $this->addtime;
    }

    /**
     * 0未验证，1已经验证
     * @return int
     */
    public function getIsuse()
    {
        return $this->isuse;
    }

}
